From: Camila Ayres Date: Wed, 5 Feb 2025 20:29:15 +0000 (+0100) Subject: Add button to scroll to top when activity list is long. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~30^2^2~75^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a7b7c1c012a916b61687be810a43868ab1b75c46;p=nextcloud-desktop.git Add button to scroll to top when activity list is long. Signed-off-by: Camila Ayres --- diff --git a/src/gui/tray/ActivityList.qml b/src/gui/tray/ActivityList.qml index 99935b48f..c5196948d 100644 --- a/src/gui/tray/ActivityList.qml +++ b/src/gui/tray/ActivityList.qml @@ -114,6 +114,28 @@ ScrollView { } } + Button { + id: scrollToTopButton + + anchors.bottom: parent.bottom + anchors.right: parent.right + + hoverEnabled: true + padding: Style.smallSpacing + + Accessible.role: Accessible.Button + Accessible.name: qsTr("Scroll to top") + Accessible.onPressAction: scrollToTopButton.clicked() + + icon.source: "image://svgimage-custom-color/chevron-double-up.svg/" + palette.buttonText + icon.width: Style.activityListButtonIconSize + icon.height: Style.activityListButtonIconSize + + onClicked: controlRoot.scrollToTop() + + visible: !controlRoot.atYBeginning && controlRoot.contentHeight > controlRoot.height + } + Column { id: placeholderColumn width: parent.width * 0.8 diff --git a/theme.qrc.in b/theme.qrc.in index 9bb049755..5f0b5b417 100644 --- a/theme.qrc.in +++ b/theme.qrc.in @@ -241,5 +241,6 @@ theme/send.svg theme/call-notification.wav theme/talk-app.svg + theme/chevron-double-up.svg diff --git a/theme/chevron-double-up.svg b/theme/chevron-double-up.svg new file mode 100644 index 000000000..3166c1750 --- /dev/null +++ b/theme/chevron-double-up.svg @@ -0,0 +1 @@ + \ No newline at end of file